<%@ page import="org.gnomus.server.Context" %>
<%@ page import="org.gnomus.server.C" %>
<%@ page import="java.util.Map" %>
<%
  Context ctx = Context.get();
%>
<%
  if ("list".equals(ctx.action)) {
%>
<jsp:include page="<%= \"/WEB-INF/game/list.jsp\" %>" />
<%
  } else if ("create".equals(ctx.action)) {
%>
<jsp:include page="<%= \"/WEB-INF/game/create.jsp\" %>" />
<%
} else if (ctx.action != null) {
  Map game_data = (Map) ctx.data.get("game");
  String type = game_data == null ? null : (String) game_data.get("type");
  String sn = null; // short name
  if (C.PERIODIC_SQUARES.equals(type)) {
    sn = "ps";
  } else if (C.BALANCING_EQUATIONS.equals(type)) {
    sn = "be";
  }
  if (sn != null) {
%>
<jsp:include page="<%= \"/WEB-INF/game/\" + ctx.action + \"/\" + sn + \".jsp\" %>" />
<%
  }
}
%>
<div class="clear"></div>